package org.apache.skywalking.apm.center.config;

public enum ConfigKeyEnum {
    /**
     *  是否采集mqkeys
     */
    MQ_KEYS_COLLECT("skywalking.agent.switch.collect.mq.keys", "mq.message.keys","true"),
    /**
     *  是否采集mq生产者端tags
     */
    MQ_PRODUCER_COLLECT_TAGS("skywalking.agent.switch.collect.mq.tags", "mq.message.tags","true"),
        /**
         *  是否采集mq生产者端参数
         */
        MQ_PRODUCER_COLLECT_PARAMS("skywalking.agent.switch.collect.mq.producer.param", "mq.producer.param","true"),
    MQ_CONSUMER_PARAM_COLLECT("skywalking.agent.switch.collect.mq.consumer.param", "mq.consumer.param", "true"),
        /**
         *  异常深度
         */
        EXCEPTION_DEPTH("skywalking.agent.switch.exception.depth", "","3"),
    /**
     *  是否采集dubbo响应
     */
    DUBBO_RESPONSE_COLLECT("skywalking.agent.switch.collect.dubbo.response", "dubbo.response","true"),
    /**
     *  是否采集dubbo参数
     */
    DUBBO_PARAMS_COLLECT("skywalking.agent.switch.collect.dubbo.param", "dubbo.param","true"),
    /**
     *  是否采集attachment
     */
    DUBBO_ATTACHMENT_COLLECT("skywalking.agent.switch.collect.dubbo.attachment", "dubbo.attachment","true"),
    /**
     *  需要过滤的attachment
     */
    DUBBO_ATTACHMENT_FILTER("skywalking.agent.switch.collect.dubbo.attachment.filter", "dubbo.attachment.filter","sw8"),

    /**
     *  需要采集的请求头
     */
    MVC_REQUEST_HEADERS_COLLECT("skywalking.agent.switch.collect.mvc.headers", "http.headers","token,loginType"),

    /**
     *  是否采集mvc请求参数
     */
    MVC_REQUEST_PARAMS_COLLECT("skywalking.agent.switch.collect.mvc.param", "http.params","true"),
    MVC_REQUEST_BODY_COLLECT("skywalking.agent.switch.collect.mvc.body", "http.body","true"),
    /**
     * 是否采集mvc响应
     */
    MVC_RESPONSE_COLLECT("skywalking.agent.switch.collect.mvc.response", "http.response","true"),
    /**
     *  是否采集redis完整命令
     */
    REDIS_COMMAND_COLLECT("skywalking.agent.switch.collect.redis.command", "redis.command","true"),
    /**
     *  是否采集redis响应
     */
    REDIS_RESPONSE_COLLECT("skywalking.agent.switch.collect.redis.result", "redis.result","true"),
    /**
     *  链路sql过滤
     */
    SQL_FILTER("skywalking.agent.switch.collect.sql.filter", "","select 1,/* ping */ SELECT 1,XA RECOVER"),
    /**
     *  是否采集jdbc参数
     */
    JDBC_PARAMS_COLLECT("skywalking.agent.switch.collect.jdbc.param", "db.sql.parameters","true"),
    /**
     *  是否采集完整sql
     */
    JDBC_COMPLETE_SQL_COLLECT("skywalking.agent.switch.collect.jdbc.sql", "db.sql.completeSql","true"),

    /**
     *  是否采集okhttp请求参数
     */
    OKHTTP_REQUEST_PARAMS_COLLECT("skywalking.agent.switch.collect.okhttp.param", "http.params","true"),
    /**
     *  是否采集okhttp请求体
     */
    OKHTTP_REQUEST_BODY_COLLECT("skywalking.agent.switch.collect.okhttp.body", "http.body","true"),

    /**
     *  是否采集httpclient参数
     */
    HTTPCLIENT_PARAMS_COLLECT("skywalking.agent.switch.collect.httpclient.param", "http.params","true"),
    /**
     *  是否采集httpclient请求体
     */
    HTTPCLIENT_REQUEST_BODY_COLLECT("skywalking.agent.switch.collect.httpclient.body", "http.body","true"),
    /**
     *  是否采集openfeign请求体
     */
    OPENFEIGN_REQUEST_BODY_COLLECT("skywalking.agent.switch.collect.openfeign.body", "http.body","true"),
    /**
     *  是否采集方法参数
     */
    TRACE_METHOD_PARAMS_COLLECT("skywalking.agent.switch.collect.method.param", "method.params","true"),
    /**
     *  是否采集@trace方法结果
     */
    TRACE_RESULT_COLLECT("skywalking.agent.switch.collect.trace.result", "method.result","true"),
    /**
     *  是否采集nettyhttp参数
     */
    NETTY_REQUEST_PARAMS_COLLECT("skywalking.agent.switch.collect.netty.param", "http.params","true"),

    /**
     *  arthas home 本地路径
     */
    ARTHAS_HOME("skywalking.agent.arthas.home", "arthas.home",""),
    /**
     *  tunnel服务端地址
     */
    TUNNEL_SERVER("skywalking.agent.arthas.tunnel", "arthas.tunnel","http://127.0.0.1:8080/tunnel"),
    /**
     *  session超时时间
     */
    SESSION_TIMEOUT("skywalking.agent.arthas.session.timeout", "arthas.session.timeout","60000"),
    /**
     *  禁用的命令
     */
    DISABLED_COMMANDS("skywalking.agent.arthas.disabled.commands", "arthas.disabled.commands", ""),

;

        private String key;
        private String tagName;
        private String defaultValue;

        ConfigKeyEnum(String key,String tagName, String defaultValue) {
            this.key = key;
            this.tagName=tagName;
            this.defaultValue = defaultValue;
        }
        public String getKey() {
            return key;
        }
        public String getTagName() {
            return tagName;
        }
        public String getDefaultValue() {
            return defaultValue;
        }
        public String [] getStringArrayDefaultValue() {
            return defaultValue.split(",");
        }
    public Boolean getBooleanDefaultValue() {
        return Boolean.valueOf(defaultValue);
    }
    public Integer getIntegerDefaultValue() {
        return Integer.valueOf(defaultValue);
    }
}
